<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/custom-html.tld" prefix="chtml" %>
<%@ page import="java.util.*"%>
<%@ page import="java.text.SimpleDateFormat"%>
<%//@ page import="org.apache.struts.Globals"%>
<%@ page import="org.apache.struts.action.Action"%>
<%@ page import="org.apache.struts.util.RequestUtils"%>
<%@ page import="com.erp.app.common.ProjectConstants"%>
<%@ page import="com.erp.framework.util.user.User"%>
<%@ page import="com.erp.framework.util.CommonUtil"%>
<%@ page import="com.erp.app.catalog.category.vo.CategoryItemLineVO"%>
<%@ page import="com.erp.app.catalog.category.vo.CategoryItemCategoryVO"%>
<%@ page import="com.erp.app.catalog.category.vo.CategoryItemClassVO"%>
<%@ page import="com.erp.app.catalog.login.web.CatalogLoginAction"%>

<jsp:useBean id="catalogLoginForm" scope="session" type="com.erp.app.catalog.login.web.CatalogLoginForm" />
<%
	ArrayList al = null;
	al = catalogLoginForm.getCategoryItemLineVos();
	pageContext.setAttribute("itemLineVos", al);
%>


<%
  Locale locale = (Locale)session.getAttribute(Action.LOCALE_KEY);
  String bgImageUrl = "";

  if (locale.equals(Locale.TAIWAN)) {
    bgImageUrl = "/images/login_bg2_big5.gif";
  } else if (locale.equals(Locale.PRC)) {
    bgImageUrl = "/images/login_bg2_gb.gif";
  } else {
    bgImageUrl = "/images/login_bg2.gif";
  }

  User editingUser = (User) session.getAttribute(ProjectConstants.SESSION_USER);



%>

<%//	String linkAdvSearch = RequestUtils.message(pageContext, "labelResources", Action.LOCALE_KEY, "header.link.advancesearch", null); %>


<%//	String loginLabel = RequestUtils.message(pageContext, "labelResources", Action.LOCALE_KEY, "general.label.system.log.in", null); %>
<%//	String logoutLabel = RequestUtils.message(pageContext, "labelResources", Action.LOCALE_KEY, "general.label.system.log.out", null); %>
<%//	String clickLabel = RequestUtils.message(pageContext, "labelResources", Action.LOCALE_KEY, "general.label.system.log.out.click", null); %>
<%//	String hereLabel = RequestUtils.message(pageContext, "labelResources", Action.LOCALE_KEY, "general.label.system.log.out.here", null); %>


    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link href="<%= request.getContextPath()%>/css/catalogCss/global.css" rel="stylesheet" type="text/css" />
	<link href="<%= request.getContextPath()%>/css/catalogCss/buttons.css" rel="stylesheet" type="text/css" />
	<link href="<%= request.getContextPath()%>/css/catalogCss/forms.css" rel="stylesheet" type="text/css" />
	<link href="<%= request.getContextPath()%>/css/catalogCss/tables.css" rel="stylesheet" type="text/css" />
	
	<SCRIPT LANGUAGE="javascript" TYPE="text/javascript" SRC="<html:rewrite page="/javascript/sys.js" />"></SCRIPT>
	<SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript">
		function openStoryboardWin() {
			<%
				if(session.getAttribute(ProjectConstants.SESSION_SELECTED_SEASON_CODE) != null) {
					session.removeAttribute(ProjectConstants.SESSION_SELECTED_SEASON_CODE);
				}
			%>
			window.open('storyboard.do',
			  'Storyboard','height=630,width=800,top=0,left=0,toolbar=no,menubar=no,scrollbars=no,resizable=yes,location=no,status=no')
		}

		<!--
		function doSearch() {
			var srchKeyword = document.forms[0].srchKeyword.value;
			parent.mainFrame.location = '../../main.jsp?searchResult.do?action=searchResult&srchKeyword='+srchKeyword;
			document.forms[0].srchKeyword.value = '';
		}
		//-->
	</SCRIPT>

	<style type="text/css">
		#container {
			width: 1000px;
			\width: 1020px;
			w\idth: 1000px;
			margin: 0px;
			padding: 0px;
			border-right-width: 1px;
			border-bottom-width: 1px;
			border-right-style: solid;
			border-bottom-style: solid;
			border-right-color: #333333;
			border-bottom-color: #333333;
			background-image: url(../images/img_toolbar_bg.png);
			background-repeat: repeat-x;
			background-position: bottom;
		}

		#container_header {
			padding: 0px;
			margin-bottom: ;
			background-color: rgb(213, 219, 225);
		}

		#content {
			padding: 0px;
			margin-left: ;
			margin-right: ;
			background-color: #FFFFFF;
			background-image: url(images/img_panel_top.png);
			background-repeat: repeat-x;
		}

		#sidebar_left {
			float: left;
			width: ;
			margin: 0;
			margin-right: ;
			padding: 0px;
			background-color: #FFFFFF;
			border-right-width: 1px;
			border-right-style: solid;
			border-right-color: #CCCCCC;
			background-image: url(images/img_panel_top.png);
			background-repeat: repeat-x;
			width: 231px;
		}

		#sidebar_right {
			float: right;
			width: ;
			margin: 0;
			margin-left: ;
			padding: 0px;
			background-color: #FFFFFF;
			border-left-width: 1px;
			border-left-style: solid;
			border-left-color: #CCCCCC;
			background-image: url(images/img_panel_top.png);
			background-repeat: repeat-x;
			width: 138px;
		}

		#footer {
			clear: both;
			padding: 0px;
			margin-top: ;
			
			background-color: rgb(213, 219, 225);
		}
	</style>
<table>
	<tr>
		<td style="font-family: Tahoma;	font-size: 9px;">
	<div id="container">
		<div id="login_bar">
			<div id="login_right">
				<%//=loginLabel%>You are logged in as
				<%=editingUser.getUserName()%> .
				&nbsp;&nbsp;
				<%//=logoutLabel%> To log out ,
				<%//=clickLabel%>click
				<a href="login.do" target="_top" ><%//=hereLabel%>HERE.</a>
			</div>
		</div>

		<div id="logo"></div>  
		<div id="page_title">
			<h1><html:text useExtensions="true" uiType="label" childTsIndex="current" name="catalogLoginForm" property="lblCategoryProductCatalog"/></h1>
		</div>

		<div id="toolbar">
			<div id="btn_menu_rounded">
				<ul>
					<li onmouseover="this.id='mouseOverSpan'" onmouseout="this.id=''" 				 id='<%=("LOGIN".equals(catalogLoginForm.getMainShowType()))?"current":""%>' >
						<a href="catalogLogin.do?mainShowType=LOGIN" >
			               <html:text useExtensions="true" uiType="label" childTsIndex="current" name="catalogLoginForm" property="lblCategoryHome"/>
						</a>
					</li> 
					
					<li onmouseover="this.id='mouseOverSpan'" onmouseout="this.id=''">
						<a href="mainMenu.do"  >						
							<html:text useExtensions="true" uiType="label" childTsIndex="current" name="catalogLoginForm" property="lblCategoryMainMenu"/>
						</a>
					</li>
				</ul>
			</div>
		</div>
		<div id="search_box">
		<!--bean:message bundle="labelResources" key="advanceSearchMaster.labelSearch"/-->
			<html:text useExtensions="true" uiType="label" childTsIndex="current" name="catalogLoginForm" property="lblCategorySearch"/>
			<input type="text" name="srchDesc" size="40"  />&nbsp;
		<!--bean:message bundle="labelResources" key="advanceSearchMaster.labelSearchIn"/-->
		in &nbsp;
        
			<html:select property="pageHeaderMainCat" >
				<option value=""/>				
				<html:options collection="itemLineVos" property="itemLine" labelProperty="itemLineDesc"/>
			</html:select>
			<input name="Search" type = "button" class="submit" value="Search" onClick="javascript:doSubmit('<%=CatalogLoginAction.ACTION_SEARCH_EXTRA%>','headerSearch');"/>
			<a href="catalogLogin.do?pageEvent=advanceSearch" class="style1">				
				<%//=linkAdvSearch%><html:text useExtensions="true" uiType="label" childTsIndex="current" name="catalogLoginForm" property="lblCategoryAdvancedSearch"/>
			</a>
		</div>
	</div>
</td></tr></table>